package vista;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.border.BevelBorder;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;

public class UI extends JFrame {

	private JPanel contentPane;
	private JLabel lblNombre;
	private JButton btnDame;
	private JButton btnCambiaColor;

	

	/**
	 * Create the frame.
	 */
	public UI() {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 450, 300);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		lblNombre = new JLabel("");
		lblNombre.setBorder(new BevelBorder(BevelBorder.LOWERED, null, null, null, null));
		lblNombre.setBounds(62, 65, 307, 14);
		contentPane.add(lblNombre);
		
		setBtnDame(new JButton("Dame"));
		
		getBtnDame().setBounds(280, 187, 89, 23);
		contentPane.add(getBtnDame());
		
		btnCambiaColor = new JButton("cambia Color");
		btnCambiaColor.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				getContentPane().setBackground(Color.BLUE);
			}
		});
		btnCambiaColor.setBounds(30, 175, 162, 23);
		contentPane.add(btnCambiaColor);
	}



	public JButton getBtnDame() {
		return btnDame;
	}



	public void setBtnDame(JButton btnDame) {
		this.btnDame = btnDame;
	}



	public JLabel getLblNombre() {
		return lblNombre;
	}
}
